<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <style>
      /* 1、rem 代表html标签的字体大小单位 */
      /* html {
        font-size: 20px;
      } */
      /* 3、配合媒体查询，重置html的大小 */
      * {
        margin: 0;
        padding: 0;
        font-size: 10px;
      }
      @media (min-width: 375.2px) {
        html {
          font-size: 37.52px;
        }
      }
      @media (min-width: 414.4px) {
        html {
          font-size: 41.44px;
        }
      }
      @media (min-width: 430.4px) {
        html {
          font-size: 43.04px;
        }
      }
      /* 移动端不能写px */
      .box {
        width: 5rem;
        height: 5rem;
        background-color: pink;
        /* margin: 0 auto; */
      }
      div {
        display: flex;
        justify-content: center;
      }
    </style>
  </head>
  <body>
    <div>
      <span class="box"></span>
    </div>
  </body>
</html>
